<!--
 * @Description: 分页
 * @Author: oscar
 * @Date: 2021-12-14 16:18:21
-->
<template>
  <div class="pages-bar">
    <el-pagination
      background
      layout="total, prev, pager, next"
      @current-change="pageChange"
      :current-page="pages.p"
      :page-size="pages.limit"
      :total="total">
    </el-pagination>
  </div>
</template>

<script lang="ts">
export default {
  name: 'pages',
  props: {
    pages: {
      type: Object,
      default() {
        return {
          p: 1,
          limit: 10
        }
      }
    },
    total: Number,
    pageChange: Function
  }
}
</script>